Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 6 - Transform Objects / Transform Objects Reference
Functions / Getting and Setting the View Port List


GXGetTransformViewPorts

You can use the GXGetTransformViewPorts function to retrieve the view port list of a transform object.

long GXGetTransformViewPorts(gxTransform source, 
                              gxViewPort list[]);
source
A reference to the transform object whose view port list you want to examine.
list
An array of view port references. On return, the array contains the view port list of the source transform.
function result
The number of view ports in the source transform's view port list.
DESCRIPTION
The GXGetTransformViewPorts function copies the list of view port references in the source transform into the array referenced by the list parameter, and returns as the function result the total number of view port references in the list.

If you pass nil for the list parameter, the function returns the number of view ports as the function result, but does not return the references to the view ports. Thus you normally call this function twice: once to determine the size of view port array to allocate, and once to retrieve the array itself.

SPECIAL CONSIDERATIONS
This function returns all view port references in the source transform's view port list, including any invalid ones (for view ports that have been disposed of).

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
transform_is_nil 
Notices (debugging version) 
transform_references_disposed_viewPort
SEE ALSO
For an example of the use of this function, see Listing 6-6 on page 6-29.

To assign a view port list to a transform object, use the GXSetTransformViewPorts function, described next.

To retrieve the view port list of the transform object associated with a specified shape, use the GXGetShapeViewPorts function, described on page 6-75.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996